{$CLEO .cs}


model.Load(#DESERT_EAGLE)
model.Load(#BAT)
model.Load(#SHOVEL)
model.Load(#CHROMEGUN)
model.Load(#COLT45)
038B: load_requested_models

//0ACD: show_text_highpriority "Zombie store loaded!" time 5000
  

10@ = marker.CreateIconAndSphere(6,  4586.0015, -3032.6748, 10.4754)
              
while true

wait 0 
        if and   
        00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere   4586.0015 -3032.6748 10.4754 radius 3.0 3.0 3.0
        not actor.Driving($PLAYER_ACTOR)
        then
             0ACD: show_text_highpriority "Press ~k~~CONVERSATION_YES~ to open weapon store." time 100

            if    and
        
                00E1:   player 0 pressed_key 11
                 02A0:   actor $PLAYER_ACTOR stopped
                82E0:  not  actor $PLAYER_ACTOR firing_weapon
            then
            break 
            end
        end
    if
    
     $onmission == 0 
    then
    
    jump @END 
    end 
end 
wait 200  
03E6: remove_text_box    

 


//0512: show_permanent_text_box 'dummy' 
08D4: 0@ = create_panel_with_title 'whoname' position  340.0  32.0 width  240.0 columns  1 interactive  1 background  1 alignment  1
08DB: set_panel 0@ column  0 header 'dummy' data 'GUN01' 'GUN02' 'GUN03' 'GUN04' 'GUN05' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy' 'dummy'
090E: set_panel 0@ active_row  0
01B4: set_player $PLAYER_CHAR can_move 0
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1

while true
wait 0 
0ADF: add_dynamic_GXT_entry "whoname" text "~w~Weapons"   

0ADF: add_dynamic_GXT_entry "GUN01" text "Colt 45 - $1200"    //GANG_STATS_LEVEL1
0ADF: add_dynamic_GXT_entry "GUN02" text "Bat $200"    //GANG_STATS_LEVEL1
0ADF: add_dynamic_GXT_entry "GUN03" text "Shotgun $2400"    //GANG_STATS_LEVEL1
0ADF: add_dynamic_GXT_entry "GUN04" text "Shovel $500"    //GANG_STATS_LEVEL1
0ADF: add_dynamic_GXT_entry "GUN05" text "Desert Eagle $3000"    //GANG_STATS_LEVEL1
08D7: 1@ = panel 0@ active_row//-- submit number of the highlighted button into variable
    if   or
    $onmission == 0
    00E1:   key_pressed  0  15//--- key = Enter/Exit
    then
    
       break 
    end 
     if  and
     010A:   player $PLAYER_CHAR money > 1200
      00E1:   key_pressed  0  16//--- key = Ped SPRINT
      1@ == 0 
    then
    0109: player $PLAYER_CHAR cash -1200
    actor.GiveWeaponAndAmmo($PLAYER_ACTOR, pistol, 25 ) 
        gosub @text 
    end 
     if  and
     010A:   player $PLAYER_CHAR money > 200
      00E1:   key_pressed  0  16//--- key = Ped SPRINT
      1@ == 1
    then
    0109: player $PLAYER_CHAR cash -200
    actor.GiveWeaponAndAmmo($PLAYER_ACTOR, baseballbat, 25 ) 
        gosub @text 
    end 
     if  and
     010A:   player $PLAYER_CHAR money > 2400
      00E1:   key_pressed  0  16//--- key = Ped SPRINT
      1@ == 2 
    then
    0109: player $PLAYER_CHAR cash -2400
    actor.GiveWeaponAndAmmo($PLAYER_ACTOR, shotgun, 20 ) 
        gosub @text 
    end 
     if  and
     010A:   player $PLAYER_CHAR money > 500
      00E1:   key_pressed  0  16//--- key = Ped SPRINT
      1@ == 3
    then
    0109: player $PLAYER_CHAR cash -500
    actor.GiveWeaponAndAmmo($PLAYER_ACTOR, shovel, 25 ) 
        gosub @text 
    end 
    
     if  and
     010A:   player $PLAYER_CHAR money > 3000
      00E1:   key_pressed  0  16//--- key = Ped SPRINT
      1@ == 4
    then
    0109: player $PLAYER_CHAR cash -3000
    actor.GiveWeaponAndAmmo($PLAYER_ACTOR, deserteagle, 30 ) 
        gosub @text 
    end 

end

08DA: remove_panel 0@
03E6: remove_text_box 
:END 
 
01B4: set_player $PLAYER_CHAR can_move 1
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
marker.Disable(10@)
if
$onmission == 0
then

end_Thread
else

 0A92: create_custom_thread "zombies/StoreWeaponsLight.cs" 

end_Thread
end 

end_Thread

:text 
0ACB: show_styled_text "~w~Brought a weapon" time 1000 style 5

wait 100
return